export const like=[]
export const changeRedheart= (f,thisSet)=>{
    if (like.indexOf(f.id) == -1) {
      thisSet(f,'heart',true)
      if(f.like_count==undefined){
        f.like_count=0
      }
        f.like_count += 1
        like.push(f.id)
      } else {
        thisSet(f,'heart',false)

        f.like_count -= 1
        for (var i in like) {
          if (like[i] == f.id) {
            like.splice(i, 1)
          }
        }
      }
}